.TH std::scoped_allocator_adaptor::scoped_allocator_adaptor 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::scoped_allocator_adaptor::scoped_allocator_adaptor \- std::scoped_allocator_adaptor::scoped_allocator_adaptor

.SH Synopsis
   Defined in header <scoped_allocator>
   scoped_allocator_adaptor();                                        \fB(1)\fP \fI(since C++11)\fP
   template< class OuterA2 >

   scoped_allocator_adaptor(                                          \fB(2)\fP \fI(since C++11)\fP
       OuterA2&& outerAlloc, const InnerAllocs&... innerAllocs

   ) noexcept;
   scoped_allocator_adaptor(

       const scoped_allocator_adaptor& other                          \fB(3)\fP \fI(since C++11)\fP

   ) noexcept;
   scoped_allocator_adaptor(

       scoped_allocator_adaptor&& other                               \fB(4)\fP \fI(since C++11)\fP

   ) noexcept;
   template< class OuterA2 >

   scoped_allocator_adaptor(                                          \fB(5)\fP \fI(since C++11)\fP
       const scoped_allocator_adaptor<OuterA2, InnerAllocs...>& other

   ) noexcept;
   template< class OuterA2 >

   scoped_allocator_adaptor(                                          \fB(6)\fP \fI(since C++11)\fP
       scoped_allocator_adaptor<OuterA2, InnerAllocs...>&& other

   ) noexcept;

   1) Default constructor: value-initializes the OuterAlloc base class and the inner
   allocator member object, if used by the implementation.
   2) Constructs the base class OuterAlloc from std::forward<OuterA2>(outerAlloc), and
   the inner allocators with innerAllocs.... This overload participates in overload
   resolution only if std::is_constructible<OuterAlloc, OuterA2>::value is true.
   3) Copy-constructor: initializes each allocator from the corresponding allocator of
   other.
   4) Move-constructor: moves each allocator from the corresponding allocator of other
   into *this.
   5) Initializes each allocator from the corresponding allocator of other. This
   overload participates in overload resolution only if
   std::is_constructible<OuterAlloc, const OuterA2&>::value is true.
   6) Initializes each allocator from the corresponding allocator of other, using move
   semantics. This overload participates in overload resolution only if
   std::is_constructible<OuterAlloc, OuterA2>::value is true.

.SH Parameters

   outerAlloc     - constructor argument for the outer allocator
   innerAllocs... - constructor arguments for the inner allocators
   other          - another std::scoped_allocator_adaptor

   Defect reports

   The following behavior-changing defect reports were applied retroactively to
   previously published C++ standards.

      DR    Applied to              Behavior as published              Correct behavior
   LWG 2782 C++11      constructors taking OuterA2 weren't             constraint added
                       constrained, interfering with metaprogramming

.SH See also

   allocate  allocates uninitialized storage using the outer allocator
             \fI(public member function)\fP
             constructs an object in allocated storage, passing the inner allocator to
   construct its constructor if appropriate
             \fI(public member function)\fP
